package com.isunland.managesystem.ui;

import android.support.v4.app.Fragment;
import com.isunland.managesystem.R;
import com.isunland.managesystem.base.BasePagerActivity;
import com.isunland.managesystem.entity.RegisterParams;

public class RegisterPagerActivity extends BasePagerActivity {

  @Override protected Fragment createFragmentOne() {
    RegisterParams params = new RegisterParams();
    params.setRegisterType(RegisterParams.TYPE_PERSONAL);

    return RegisterFragment.newInstance(params, new RegisterFragment());
  }

  @Override protected Fragment createFragmentTwo() {
    RegisterParams params = new RegisterParams();
    params.setRegisterType(RegisterParams.TYPE_COMPANY);

    return RegisterFragment.newInstance(params, new RegisterFragment());
  }

  @Override public Fragment createFragmentThree() {
    RegisterParams params = new RegisterParams();
    params.setRegisterType(RegisterParams.TYPE_UPGRADE);

    return RegisterFragment.newInstance(params, new RegisterFragment());
  }

  @Override protected int[] createTitle() {
    return new int[] { R.string.personalUser, R.string.companyUser, R.string.personalUserUpdate };
  }

  @Override protected void setFixedTitle(boolean isFixedTitle, String fixedTitle) {
    super.setFixedTitle(true, getString(R.string.register));
  }
}
